<?php
namespace PsiFramework\Applications\AlloMediaPortal\Classes\Model;

import("Classes.Model.Object");

use \PsiFramework\Classes\Model\Object;

/**
 * AlloMedia
 * Portail des professionnels
 *
 * @author Rémi San
 * @version beta
 */

/**
 * Classe d'une entrée dans un annuaire allomedia
 *
 * @package Model
 */
class AlloMediaEntry extends Object
{

    protected /*int*/              $_id ;
    protected /*User*/             $_user;
    protected /*Category*/         $_category;
    protected /*string*/           $_name ;
    protected /*string*/           $_address ;
    protected /*string*/           $_city ;
    protected /*string*/           $_zip ;
    protected /*string*/           $_tel ;
    protected /*string*/           $_mobile ;
    protected /*string*/           $_tel2 ;
    protected /*string*/           $_fax ;
    protected /*Date*/             $_modificationDate ;
    protected /*SiteMembership[]*/ $_sites;
    protected /*ResponseId[]*/     $_responseIds;

    /**
     * Constructeur
     *
     * @param       int                  $id               L'identifiant du site
     * @param       User                   $user             Le user lié
     * @param       Category               $category       La catégorie
     * @param       SiteMembership[]      $sites           Les sites
     */
    public function __construct(
        /*int*/ $id=null,
        /*User*/ $user=null,
        /*Category*/ $category=null,
        /*string*/ $name=null,
        /*string*/ $address=null,
        /*string*/ $city=null,
        /*string*/ $zip=null,
        /*string*/ $tel=null,
        /*SiteMembership[]*/ $sites=null,
        /*ResponseId[]*/ $responseIds=null
    )
    {
        $this->_id = $id ;
        $this->_user = $user ;
        $this->_category = $category ;
        $this->_name = $name ;
        $this->_address = $address ;
        $this->_city = $city ;
        $this->_zip = $zip ;
        $this->_tel = $tel ;
        $this->_sites = $sites ;
        $this->_responseIds = $responseIds ;
    }

    public function getId()
    {
        return $this->_id ;
    }

    public function setId($id)
    {
        $this->_id = $id ;
    }

    public function getUser()
    {
        return $this->_user ;
    }

    public function setUser($user)
    {
        $this->_user = $user ;
    }

    public function getCategory()
    {
        return $this->_category ;
    }

    public function setCategory($category)
    {
        $this->_category = $category ;
    }

    public function getName()
    {
        return $this->_name ;
    }

    public function setName($name)
    {
        $this->_name = $name ;
    }

    public function getAddress()
    {
        return $this->_address ;
    }

    public function setAddress($address)
    {
        $this->_address = $address ;
    }

    public function getCity()
    {
        return $this->_city ;
    }

    public function setCity($city)
    {
        $this->_city = $city ;
    }

    public function getZip()
    {
        return $this->_zip ;
    }

    public function setZip($zip)
    {
        $this->_zip = $zip ;
    }

    public function getTel()
    {
        return $this->_tel ;
    }

    public function setTel($tel)
    {
        $this->_tel = $tel ;
    }
    
    /**
     * Getter for the member variable $mobile
     *
     * @return string
     */
    public function getMobile()
    {
    	return $this->_mobile ;
    }
    
    /**
     * Setter for the member variable $mobile
     *
     * @param string $mobile the mobile
     *
     * @return void
     */
    public function setMobile(/*string*/ $mobile)
    {
    	$this->_mobile = $mobile ;
    }
    
    /**
     * Getter for the member variable $tel2
     *
     * @return string
     *
     * @return void
     */
    public function getTel2()
    {
    	return $this->_tel2 ;
    }
    
    /**
     * Setter for the member variable $tel2
     *
     * @param string $tel2 the tel2
     */
    public function setTel2(/*string*/ $tel2)
    {
    	$this->_tel2 = $tel2 ;
    }
    
    /**
     * Getter for the member variable $fax
     *
     * @return string
     */
    public function getFax()
    {
    	return $this->_fax ;
    }
    
    /**
     * Setter for the member variable $fax
     *
     * @param string $fax the fax
     *
     * @return void
     */
    public function setFax(/*string*/ $fax)
    {
    	$this->_fax = $fax ;
    }

    public function getModificationDate()
    {
        return $this->_modificationDate ;
    }

    public function setModificationdate($modificationDate)
    {
        $this->_modificationDate = $modificationDate ;
    }

    public function getSites()
    {
        return $this->_sites ;
    }

    public function setSites($sites)
    {
        $this->_sites = $sites ;
    }

    public function addSite($site)
    {
        if (is_null($this->_sites)) {
        	$this->_sites = array();
        }
        $this->_sites[] = $site ;
    }

    public function getResponseIds()
    {
        return $this->_responseIds ;
    }

    public function setResponseIds($responseIds)
    {
        $this->_responseIds = $responseIds ;
    }

    public function addResponseId($responseId)
    {
        if (is_null($this->_responseIds)) {
        	$this->_responseIds = array();
        }
        $this->_responseIds[] = $responseId ;
    }

    public function toString()
    {
        return $this->_name ;
    }
}
